const data = window._videoAccess.monitorSelect || {};

if (data.monitorLevel == 'root') {
    console.log(data, 2222)
    const delModals = this.pageObj.getApiWidgetsByClassName('del-modal');
    delModals.forEach(v => v.hideWidget());
    const $form = this.pageObj.getApiWidgetByAliasName('monitor_form').widgetObj;
    $form.setFormData('monitor_form', { viewName: '', viewType: data.viewType, projectCode: 'cqdz' });
    const $modalTitle = this.pageObj.getApiWidgetByAliasName('monitor-modal-title').widgetObj;
    $modalTitle._option.links.text = '新建视图';
    $modalTitle.render();
    const modals = this.pageObj.getApiWidgetsByClassName('monitor-modal');
    modals.forEach(v => v.showWidget());
    window._videoAccess.monitorSelect = { ...window._videoAccess.monitorSelect, operate: 'add' };
} else {
    layer.msg('请选择视图类型');
}
